/**
 *  HEX color to RGB
 */
export function hexToRGB(hex: string) {
  let sHex = hex.toLowerCase();
  if (sHex.length === 4) {
    let sColorNew = "#";
    for (let i = 1; i < 4; i += 1) {
      sColorNew += sHex.slice(i, i + 1).concat(sHex.slice(i, i + 1));
    }
    sHex = sColorNew;
  }
  const sColorChange: number[] = [];
  for (let i = 1; i < 7; i += 2) {
    sColorChange.push(parseInt("0x" + sHex.slice(i, i + 2)));
  }
  return sColorChange;
}
